import { NgModule } from "@angular/core";
import { Routes, RouterModule } from "@angular/router";
import { EmptyComponent } from "./empty.component";

const routes: Routes = [
  { path: "", pathMatch: "full", redirectTo: "/dashboard/workplace" },
  {
    path: "dashboard",
    loadChildren: () => import("./pages/dashboard/dashboard.module").then((m) => m.DashboardModule)
  },
  {
    path: "**",
    component: EmptyComponent
  }
];

@NgModule({
  imports: [
    RouterModule.forRoot(routes, {
      scrollPositionRestoration: "enabled"
    })
  ],
  exports: [RouterModule]
})
export class AppRoutingModule {}
